package view;

import service.*;

import java.util.Scanner;

public class ConsoleView {
    //登录界面
    studentManagerservice studentManagerservice=new studentManagerservice();
    public void loginView(){
        String namea;
        String passworda;
        boolean islongin;
        Adminservice adminservice=new Adminservice();
        System.out.println("输入账户：");
        Scanner sc=new Scanner(System.in);
        namea=sc.nextLine();
        System.out.println("输入密码：");
        passworda=sc.nextLine();
        islongin = adminservice.lojin(namea,passworda);
        if(islongin){
            System.out.println("登录成功");
        }else {
            System.out.println("登录失败");
            System.out.println("请重新输入");
            loginView();
        }
        manView();
    }
    //操作菜单界面
    public void manView(){
        System.out.println("1.新增学生");
        System.out.println("2.开除学生");
        System.out.println("3.查找学生");
        System.out.println("4.修理学生");
        System.out.println("5.退出系统");
        int sum=studentManagerservice.selectMenNum();
        System.out.println("nnnn"+sum);
    }
}
